#!/usr/env/bin python
# -*- coding: utf-8 -*-

# @Time    : 2018/12/29 10:11
# @Author  : yangdy
# @Email   : yangdy@egu360.com
# @File    : wxwork_applications.py
# @Software: PyCharm

egu = {
    10: (408, 18, 177),
    11: (342, 22, 178),
    12: (347, 21, 179)
}

# e谷信息库
a = \
    1 + 2 + 5 + 4 + 2 + \
    1 + 4 + 2 + 6 + 3 + \
    6 + 6 + 5 + 4 + 8 + \
    2 + 6 + 3 + 7 + 4 + 2

# 来访企业库
b = \
    96 + 83 + 100 + 21 + 89 + \
    89 + 84 + 99 + 32 + 97 + \
    100 + 101 + 93 + 95 + 19 + \
    11 + 7 + 105 + 103 + 26 + 3

# 在孵企业库
c = \
    6 + 84 + 101 + 78 + 87 + \
    105 + 99 + 80 + 99 + 88 + \
    114 + 106 + 90 + 97 + 87 + \
    81 + 18 + 13 + 109 + 95 + 65

# 合作伙伴库
d = \
    8 + 83 + 21 + 89 + 11 + \
    11 + 4 + 1 + 8 + 7 + \
    116 + 104 + 15 + 91 + 30 + \
    121 + 25 + 9 + 9 + 5 + 4


print(egu)
print(egu[10])
egu_average = 0
count = 0
for i in [10, 11, 12]:
    egu_average += egu[i][0]
    count += egu[i][1]
egu_average /= count


print('egu:', egu_average, egu[10][0]/egu[10][1],
      egu[11][0]/egu[11][1], egu[12][0]/egu[12][1])
print('egu:', egu_average/egu[12][2], egu[10][0]/egu[10][1]/egu[12][2],
      egu[11][0]/egu[11][1]/egu[12][2], egu[12][0]/egu[12][1]/egu[12][2])

print(a/egu[12][1], b/egu[12][1], c/egu[12][1], d/egu[12][1])
print(a/egu[12][1]/egu[12][2], b/egu[12][1]/egu[12][2],
      c/egu[12][1]/egu[12][2], d/egu[12][1]/egu[12][2],
      (a+b+c+d)/4/egu[12][1]/egu[12][2])
